﻿<?
require("conn.php");

$id = $_GET["id"];
$string1 = "var $id = ";
$all = array();
if(!empty($id)&&$id="all"){

	$sql = "select * from ` modules_info` LIMIT 0, 30 ";
	mysql_query("SET NAMES 'UTF8'");
	$result = mysql_query($sql);
	while($row = mysql_fetch_object($result)){
		$escapeHtml = htmlspecialchars(
				str_replace("\n","",
					 str_replace("\t","",$row->htmlCode)
				)
			);
		//echo "$c</br>";
		array_push($all,
			array(
				'mid' => $row->name,
				'cname' => $row->cname,
				'htmlCode' => $row->htmlCode, 
				'cssCode' => $row->cssCode
			)
		);	
	};
	$jsonstr = json_encode($all);
	echo $jsonstr;
}else{
	echo "请输入正确的参数";
}
?>